<%-- 
    Document   : manage_eca_edit
    Created on : Jul 23, 2012, 3:29:37 AM
    Author     : Don
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        
        <style type ="text/css">
        @import url(admin/css/jqtransform.css);
        @import url(admin/css/validationEngine.jquery.css);
        @import url(admin/css/ui-lightness/jquery-ui-1.8.19.custom.css);
        </style>
        <script type="text/javascript" src="admin/js/jquery-latest.js"></script>
        <script type="text/javascript" src="admin/js/jquery-ui-1.8.19.custom.min.js"></script>
        <script type="text/javascript" src="admin/js/jquery"></script>
        <script type="text/javascript" src="admin/js/jquery.jqtransform.js"></script>
        <script type="text/javascript" src="admin/js/jquery.validationEngine-en.js"></script>
        <script type="text/javascript" src="admin/js/jquery.validationEngine.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                
                
                //find all form with class jqtransform and apply the plugin
                $("form.jqtransform").jqTransform();
                
                $('#bday').datepicker({ dateFormat: 'yy-mm-dd' });
                $('#add_form').validationEngine('attach');
                $('#cancelForm').click(function(){
                    $('#panel').html(''); 
                });

            });
        </script>
    </head>
    <body>
    Edit Member    
    <form id="add_form" class="jqtransform" method="post" action="${pageContext.request.contextPath}/manage_mem_edit">
    <table style="width: 50%">
        <input type="hidden" name="memberid" type="text" <c:if test="${!empty memItem}"> value="${memItem.memberid}"</c:if>/>
		<tr>
			<td><label> Username</label></td>
			<td><input id ="username" class="validate[required,maxSize[15]] text-input"  name="username" type="text" <c:if test="${!empty memItem}"> value="${memItem.username}" </c:if> id='name' class="" title=""/></td>
		</tr>
		<tr>
			<td><label> Password </label></td>
			<td><input id ="password" class="validate[required,minSize[8] text-input" name="password" type="password" <c:if test="${!empty memItem}"> value="${memItem.password}" </c:if> /> </td>
		</tr>
                <tr>
			<td><label> RePass </label></td>
			<td><input id ="repassword" class="validate[required,equals[password]] text-input" name="repassword" type="password" <c:if test="${!empty memItem}"> value="${memItem.password}" </c:if> /> </td>
		</tr>
		<tr>
			<td><label> Firstname </label></td>
			<td><input id ="firstname"class="validate[required,custom[onlyLetterSp]]" name="firstname" type="text" <c:if test="${!empty memItem}"> value="${memItem.firstname}" </c:if> /></td>
		</tr>
		<tr>
			<td><label> Lastname </label></td>
			<td><input id ="lastname"class="validate[required,custom[onlyLetterSp]]" name="lastname" type="text" <c:if test="${!empty memItem}"> value="${memItem.lastname}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Nickname </label></td>
			<td><input id ="nickname"class="validate[required,custom[onlyLetterSp]]" name="nickname" type="text" <c:if test="${!empty memItem}"> value="${memItem.nickname}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Birthdate </label></td>
			<td><input id ="birthdate"class="validate[required,custom[date]] text-input" id="bday" name="bday" type="text" <c:if test="${!empty memItem}"> value="${memItem.birthdate}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Course </label></td>
			<td><input id ="course"class="validate[required]" name="course" type="text" <c:if test="${!empty memItem}"> value="${memItem.course}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Batch </label></td>
			<td><input id ="batch"class="validate[required,custom[integer]]" name="batch" type="text" <c:if test="${!empty memItem}"> value="${memItem.batch}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Position </label></td>
			<td><input id ="position"class="validate[required,custom[onlyLetterSp]]" name="position" type="text" <c:if test="${!empty memItem}"> value="${memItem.position}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Phone </label></td>
			<td><input id ="phone"class="validate[required,custom[integer]]" name="pnumber" type="text" <c:if test="${!empty memItem}"> value="${memItem.phone_number}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Cellphone </label></td>
			<td><input id ="cellphone"class="validate[required,custom[integer]]" name="cnumber" type="text" <c:if test="${!empty memItem}"> value="${memItem.cell_number}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Email </label></td>
			<td><input id ="email"class="validate[required,custom[email]] text-input" name="email" type="text" <c:if test="${!empty memItem}"> value="${memItem.email}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> CGPA </label></td>
			<td><input id ="cgpa"class="validate[required,custom[number]] text-input" name="cgpa" type="text" <c:if test="${!empty memItem}"> value="${memItem.cgpa}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Points </label></td>
			<td><input id ="points"class="validate[required,custom[number]] text-input" name="points" type="text" <c:if test="${!empty memItem}"> value="${memItem.eca_points}" </c:if>  /></td>
		</tr>
                <tr>
			<td><label> Status </label></td>
			<td><input id ="status"class="validate[required,custom[onlyLetterSp]]" name="status" type="text" <c:if test="${!empty memItem}"> value="${memItem.status}" </c:if>  /></td>
		</tr>
    </table>
    <input type="submit" id ="editMember" name="editMember" value="Submit"/>
    </form>
    </body>
</html>

